package com.flyco.modules.stm.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.flyco.common.aspect.annotation.Dict;
import com.flyco.poi.excel.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @Description: 渠道产品表
 * @Author: flyco
 * @Date:   2023-06-21
 * @Version: V1.0
 */
@Data
@TableName("stm_channel_price")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="stm_channel_price对象", description="金蝶同步的渠道产品表")
public class StmChannelPrice {

	/**id*/

    @ApiModelProperty(value = "id")
	private Integer id;

	@ApiModelProperty(value = "商家编码")
	private Long partnerId;
	@Excel(name = "渠道Id", width = 15)
    @ApiModelProperty(value = "渠道Id")
	private String channelId;

	@ApiModelProperty(value = "经销商Id")
	@Excel(name = "经销商Id", width = 15)
	private String storeId;
	/**物料编码*/
	@Excel(name = "物料编码", width = 15)
    @ApiModelProperty(value = "sku编码")
	private String skuCode;
	/**渠道价格*/
	@Excel(name = "价格", width = 15)
    @ApiModelProperty(value = "渠道价格")
	private java.math.BigDecimal price;
	/**商品名称*/
	@Excel(name = "商品名称", width = 15)
    @ApiModelProperty(value = "商品名称")
	private String productName;
	/**生效时间*/
	@Excel(name = "生效日期", width = 20, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "生效日期")
	private Date createTime;
	private Date updateTime;

	@Excel(name = "状态", width = 15)
	@ApiModelProperty(value = "状态  1 有效  0无效 ")
	@Dict(dicCode = "channelProductStatus" )
	private Integer status;

	@TableId(type = IdType.NONE)
	@ApiModelProperty(value = "唯一码，")
	private String uniCode;

	@ApiModelProperty(value = "箱规")
	@TableField(exist = false)
	private String boxUnit;

	@ApiModelProperty(value = "渠道名称")
	@TableField(exist = false)
	private String channelName;

	@ApiModelProperty(value = "起订单位，0按件，1按个")
	private String  stockType;
}
